﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Runtime.Serialization;

namespace ERPStore.NewsLetters.Models
{
	/// <summary>
	/// Campagne d'emailing
	/// </summary>
    [DataContract]
	public class Campaign : ERPStore.Models.IModelIdentity
	{
		public Campaign()
		{
		}
		/// <summary>
		/// Identifiant interne de la campagne
		/// </summary>
		/// <value>The id.</value>
        [DataMember]
		public int Id { get; set; }
		/// <summary>
		/// Nom de la campagne
		/// </summary>
		/// <value>The name.</value>
        [DataMember]
		public string Name { get; set; }
		/// <summary>
		/// Description de la campagne
		/// </summary>Para
		/// <value>The description.</value>
		[DataMember]
		public string Description { get; set; }
		/// <summary>
		/// Adresse email de reponse 
		/// </summary>
		/// <value>The reply to email.</value>
        [DataMember]
        public string ReplyToEmail { get; set; }
		/// <summary>
		/// Nom complet de l'adresse email de reponse
		/// </summary>
		/// <value>The name of the reply to email.</value>
        [DataMember]
        public string ReplyToEmailName { get; set; }
		/// <summary>
		/// Id du serveur SMPT utisé 
		/// </summary>
		[DataMember]
		public int SMTPServerId { get; set; }
		[DataMember]
		public string SMTPServerName { get; set; }
		/// <summary>
		/// Date de création de la campagne
		/// </summary>
		/// <value>The creation date.</value>
        [DataMember]
        public DateTime CreationDate { get; set; }
        /// <summary>
        /// Gestion des accès concurrentiels
        /// </summary>
        /// <value>The version.</value>
        [DataMember]
        public byte[] Version { get; set; }
		/// <summary>
		/// Identifiant interne de la news letter à envoyer
		/// </summary>
		[DataMember]
		public int NewsLetterId { get; set; }
		[DataMember]
		public string NewsLetterName { get; set; }
		/// <summary>
		/// Propriétaire de la news letter
		/// </summary>
		[DataMember]
		public int OwnerId { get; set; }
		/// <summary>
		/// Etat de l'envoi
		/// </summary>
		[DataMember]
		public SendState State { get; set; }
		/// <summary>
		/// Clé publique pour la page de consultation des stats
		/// </summary>
		[DataMember]
		public string PublicKey { get; set; }
		/// <summary>
		/// Paramètres supplémentaires à intégrer dans toutes les URLs
		/// </summary>
        [DataMember]
        public string AdditionalUrlParameters { get; set; }
		/// <summary>
		/// Nom de la source de données
		/// </summary>
		[DataMember]
		public int EmailListSourceId { get; set; }
		[DataMember]
		public string EmailListSourceName { get; set; }
		/// <summary>
		/// Statistiques sur la campagne
		/// </summary>
		[DataMember]
		public CampaignStat Stats { get; set; }
	}
}
